<template>
  <div class="pd30">

    <!--图表一-->
    <earningChart class="mt0" :view-value="TaoMpInfo" :mp_type="2"/>

    <!--图表二-->
    <singleChart :view-value="TaoMpInfo" :mp_type="2"/>

    <!--图标三-->
    <tencentChart :view-value="TaoMpInfo" :mp_type="2"/>

  </div>
</template>

<script>
  import tencentChart from '../components/tencent_chart'
  import earningChart from '../components/earning_chart'
  import singleChart from '../components/single_chart'

  export default {
    components: {
      earningChart,
      tencentChart,
      singleChart,
    },
    data() {
      return {
        TaoMpInfo:[
          {
            label: '全部',
            value: ''
          },
          {
            label: '微赞',
            value: '微赞'
          },
          {
            label: '乾丰',
            value: '乾丰'
          },
        ],

      }
    },
    mounted() {
      this.getFormValue()
    },
    methods: {
      // 获取员工列表
      getFormValue() {
        this.$get('action/TaoMpInfo/formValue')
          .then(res => {
            const TaoMpInfo = []
              res.data.TaoMpInfo.forEach(item => {
                TaoMpInfo.push({
                  label: item.mp_name,
                  value: item.mp_name
                })
              })
            this.TaoMpInfo = this.TaoMpInfo.concat(TaoMpInfo)
          })
          .catch(_ => console.log(1))
      },
    }
  }
</script>
<style lang="scss" type="text/scss" scoped>
  .document {
    font-size: 40px;
    margin-right: 5px
  }

  .shadow {
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
    border-radius: 4px;
  }

  .pd30 {
    padding: 20px;
  }
.mb5{
  margin-bottom: 5px;
}
  .blue {
    background-color: #35AE98;
  }

  .red {
    background-color: #F05050;
  }

  .green {
    background-color: #27C24C;
  }

  .purple {
    background-color: #7266BA;
  }

  .small {
    font-size: 12px;
  }

  .flex-end {
    justify-content: flex-end;

  }

  .pdh10 {
    padding: 2px 10px;
  }

  .flex-auto {
    flex: 1;
  }

  .tar {
    text-align: right;
  }
  .mv15{
    margin: 15px 0 ;
  }
</style>
